<?php

namespace Database\Factories;

use App\Models\StoreCouponIssue;
use Illuminate\Database\Eloquent\Factories\Factory;

class StoreCouponIssueFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = StoreCouponIssue::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'cid' => $this->faker->numberBetween(1,20),
            'product_id' => $this->faker->numberBetween(1,20),
            'system_admin_id' => $this->faker->numberBetween(1,20),
            'category_id' => $this->faker->randomElement([1,10]),
            'total_count' => $this->faker->numberBetween(1,20),
            'remain_count' => $this->faker->numberBetween(1,20),
            'full_reduction' => $this->faker->numberBetween(1,100),
            'title' => $this->faker->text(5),
            'integral' => $this->faker->numberBetween(1, 100),
            'coupon_price' => $this->faker->numberBetween(1, 100),
            'use_min_price' => $this->faker->randomFloat(2, 0, 10),
            'coupon_time' => $this->faker->numberBetween(1, 100),
            'status' => $this->faker->randomElement([0, 1]),
            'is_full_give' => $this->faker->randomElement([0, 1]),
            'is_give_subscribe' => $this->faker->randomElement([0, 1]),
            'is_permanent' => $this->faker->randomElement([0, 1]),
            'type' => $this->faker->randomElement(['receives_one', 'receives_two', 'receives_three']),
            'receive_type' => $this->faker->randomElement(['receive_one', 'receive_two', 'receive_three', 'receive_four']),
            'start_use_time' => $this->faker->time('Y-m-d H:i:s'),
            'end_use_time' => $this->faker->time('Y-m-d H:i:s'),
            'sort' => $this->faker->randomElement([0, 1]),
            'start_time' => $this->faker->time('Y-m-d H:i:s'),
            'end_time' => $this->faker->time('Y-m-d H:i:s'),
        ];
    }
}
